package com.sqz.mybatisplus.demo.util;

import cn.hutool.core.util.IdUtil;
import com.sqz.mybatisplus.demo.model.User;
import java.util.Date;

import static com.sqz.mybatisplus.demo.util.HardWareUtils.getMac;


/**
 * @author 11464
 * 每次获取不一样的User实例
 */
public class InstanceUtil {

    private static String userName = "admin";
    private static String pwd = getMac();

    public static User getUser(String name) {
        User user = new User();
        user.setUsername(name);
        user.setMobile("13000000000");
        user.setPassword(pwd);
        user.setCreateTime(new Date());
        user.setUserId(IdUtil.objectId());
        return user;
    }

    public static User getUser(String id,String name) {
        User user = new User();
        user.setUsername(name);
        user.setMobile("13000000000");
        user.setPassword(pwd);
        user.setCreateTime(new Date());
        user.setUserId(id);
        return user;
    }

}
